Getting number of days between [NSDate date] and string @"2010-11-12"
Posted
by
grobald
on Stack Overflow
See other posts from Stack Overflow
or by grobald
Published on 2010-11-02T16:26:25Z
Indexed on
2011/01/02
18:54 UTC
Read the original article
Hit count: 145
Hello
i have a question.
in short: i need a function which receives [NSDate date] and string @"2010-11-12" and returns the amount of days between those two dates.
more explanation: I need to store a date from a server in the format @"2010-11-12" in my NSUserdefaults. The meaning of this date is the expireDate of a feature in an iPhone App. Everytime i press on a button for this feature i need to check if the difference in days between the current time->[NSDate date] and @"2010-11-12" is greater than 0. That means tahat the feature is disabled.
its making me crazy mabey its to dead simple.
© Stack Overflow or respective owner